package nju.mscs.data.object;

import java.io.Serializable;

public class GoodsGiftPromotion extends Promotion implements Serializable, GiftPromotion,GoodsPromotion {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8896304658699163271L;
	private Gift gift;
	private Goods goods;
	
	GoodsGiftPromotion(String id,Goods gd,Gift gf,Date begin,Date over){
		super(id,Promotion.GoodsGiftPromotion,begin,over);
		this.gift = gf;
		this.goods = gd;
	};
	@Override
	public boolean check(Goods goods) {
		// TODO Auto-generated method stub
		return goods.getId().equals(this.goods.getId());
	}

	@Override
	public Gift getGift() {
		// TODO Auto-generated method stub
		return gift;
	}
	@Override
	public Goods getGoods() {
		// TODO Auto-generated method stub
		return goods;
	}
}
